<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link rel="stylesheet"
	href="<c:url value="/resources/lib/bootstrap-3.3.5/css/bootstrap.min.css"/>" />
	<link href="/resources/lib/font-awesome-4.4.0/css/font-awesome.min.css"
	rel="stylesheet" type="text/css" />
		<link href="/resources/css/header.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet"
	href="<c:url value="/resources/css/common.css"/>" />
<link rel="stylesheet"
	href="<c:url value="/resources/css/soap/createConnection.css"/>" />
<script src="<c:url value="/resources/lib/jquery-2.1.4.min.js" />"
	type="text/javascript"></script>
<script
	src="<c:url value="/resources/lib/bootstrap-3.3.5/js/bootstrap.min.js" />"
	type="text/javascript"></script>
<script
	src="<c:url value="/resources/lib/angular-1.4.7/angular.min.js"/>"
	type="text/javascript">
	
</script>
<script src="<c:url value="/resources/js/soap/createConnection.js" />"
	type="text/javascript"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>create soap connection</title>
</head>
<body ng-app="conversionTool">
<ng-include src="'/resources/viewPart/nav.html'" >
	
	</ng-include>
	<header>
	<div class="head-line">
		<h3 class="head-title">Create Soap Connection</h3>
		</div>
	</header>

	<section class="container" ng-controller="CreateConnectionCtrl">

		<form method="post" ng-submit="save()" action="/soap/saveConnection" class="form-horizontal text-center">
		
		<div ng-init="isEdit=${isEdit}" />	
		
			<input type="hidden" value="${soapConnection.id}" name="id"/>
			
			<div class="form-group text-center form-line">
			<div class="col-xs-4 text-right">
			<label for="connectionName">Connection Name</label>
			</div>
				<div class="col-xs-8">
		    <input type="text" class="form-control" id="connectionName" name="connectionName" placeholder="please enter connection name"ng-init="SoapConnection.connectionName='${soapConnection.connectionName}'"
			ng-model="SoapConnection.connectionName" ng-disabled="!isEdit" />
			</div>
			</div>

			<div class="form-group text-center form-line">
			 <div class="col-xs-4 text-right">
			<label for="description">Description</label>
			</div>
			<div class="col-xs-8">
			
			<textarea id="description" class="form-control" name="description" ng-init="SoapConnection.description='${soapConnection.description}'"
					ng-disabled="!isEdit" ng-model="SoapConnection.description"></textarea>
					
			</div>
			</div>


			<div class="form-group text-center form-line">
			<div class="col-xs-4 text-right">
			<label for="endpoint">Endpoint</label> 
				</div>
				<div class="col-xs-8">
				<input type="text"
					class="form-control" id="endpoint" name="endpoint"
					placeholder="please enter endpoint"
					ng-init="SoapConnection.endpoint='${soapConnection.endpoint}'"
					ng-model="SoapConnection.endpoint" ng-disabled="!isEdit" />
			</div>
			</div>


			<div class="form-group text-center form-line" >
			<div class="col-xs-4"></div>
			<div class="col-xs-8 text-left">
             <div class="btn-group" ng-init="SoapConnection.passwordType='${soapConnection.passwordType}'">
			<button type="button" class="btn btn-primary" ng-class="{active: 'None'== SoapConnection.passwordType}"  ng-click="setType('None')">None</button>
			<button type="button" class="btn btn-primary" ng-class="{active: 'PasswordText'== SoapConnection.passwordType}"  ng-click="setType('PasswordText')">PasswordText</button>
			<button type="button" class="btn btn-primary" ng-class="{active: 'PasswordDigest'== SoapConnection.passwordType}"ng-click="setType('PasswordDigest')">PasswordDigest</button>
			</div>
			</div>
			</div>
			
				<!-- <div class="radio" ng-init="SoapConnection.passwordType='${soapConnection.passwordType}'" >
				<lable><input type="radio" ng-class="{active: 'None'== SoapConnection.passwordType}"  ng-click="setType('None')">None</label>
				</lable> <br/>
				
				<lable><input type="radio" ng-class="{active: 'PasswordText'== SoapConnection.passwordType}"  ng-click="setType('PasswordText')">PasswordText</label>
				</lable>
				<input name="passwordType" ng-model='SoapConnection.passwordType' value="{{SoapConnection.passwordType}}" type="hidden"/>
			</div>
    ng-show="setType('PasswordText')==true"-->
            <input name="passwordType" ng-model='SoapConnection.passwordType' value="{{SoapConnection.passwordType}}" type="hidden"/>
			<div class="form-group text-center form-line" >
             <div class="col-xs-4 text-right">
				<label for="userName">User Name</label>
			</div>
			<div class="col-xs-8">
	         <input type="text" class="form-control" id="userName" name="userName" placeholder="please enter user name" ng-init="SoapConnection.userName='${soapConnection.userName} '"ng-model="SoapConnection.userName" ng-disabled="!isEdit" />
			</div>
			</div>

			<div class="form-group text-center form-line">
               <div class="col-xs-4 text-right">
				<label for="password">Password </label>
				</div>
				<div class="col-xs-8">
				
				 <input type="text"
					class="form-control" id="password" name="password"
					placeholder="please enter password"
					ng-init="SoapConnection.password='${soapConnection.password} '"
					ng-model="SoapConnection.password" ng-disabled="!isEdit" />
			</div>
			</div>


			<div class="form-group text-center form-line">
			<div class="col-xs-4"></div>
			<div class="col-xs-8">
			<input type="button" value="Edit" class="btn btn-primary" ng-disabled="isEdit" ng-click="edit()" /> 
			<input type="submit" value="Save" ng-disabled="!isEdit" class="btn btn-primary"/>
			</div>
			</div>

			<div class="control-group error">
				<div class="controls">

					<span class="help-inline" ng-init="msg='${msg}'">{{msg}}</span>
				</div>
			</div>

		</form>





	</section>


</body>
</html>